package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;
import com.yanqu.road.entity.log.maidian.impl.TokenBuyMoneyPrice;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_gold_token_buy", autoSave = true, dataUpload = true, eventName = "tb_finish")
public class LogGoldTokenBuy extends BaseLogEntity {

    @FieldTypeAnnotation(isIndex = true)
    private long userId;

    @FieldTypeAnnotation(desc = "商品编号", dataAttribute = "mallId")
    private int mallId;

    @FieldTypeAnnotation(desc = "购买数量", dataAttribute = "count")
    private int count;

    @FieldTypeAnnotation(desc = "购买价格")
    private String price;

    @FieldTypeAnnotation(desc = "原vip经验")
    private long oldVipExp;

    @FieldTypeAnnotation(desc = "vip经验")
    private long vipExp;

    @FieldTypeAnnotation(desc = "活动编号")
    private int activityId;

    @FieldTypeAnnotation(desc = "活动标识", dataAttribute = "acttype")
    private String acttype;

    @FieldTypeAnnotation(desc = "手机平台，0:默认值；1:Android；2:ios")
    private int phonePlatform;

    @FieldTypeAnnotation(desc = "奖励")
    private String reward;

    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;

    @FieldTypeAnnotation(desc = "钱的价格(仅数数)", insert = false,  dataAttribute = "moneyPrice2", custom = TokenBuyMoneyPrice.class)
    private String moneyPrice2;

    @FieldTypeAnnotation(desc = "钱的价格")
    private String moneyPrice;

    @FieldTypeAnnotation(desc = "商品标识编号", dataAttribute = "markid")
    private int mallMarkId;

    @FieldTypeAnnotation(desc = "币种(仅数数)", insert = false, dataAttribute = "pay_type")
    private String payType;

    public LogGoldTokenBuy(long userId, int mallId, int count, String price, long oldVipExp, long vipExp, int activityId, String acttype, int phonePlatform, String reward, String moneyPrice, int mallMarkId, String payType) {
        this.userId = userId;
        this.mallId = mallId;
        this.count = count;
        this.price = price;
        this.oldVipExp = oldVipExp;
        this.vipExp = vipExp;
        this.activityId = activityId;
        this.acttype = acttype;
        this.phonePlatform = phonePlatform;
        this.reward = reward;
        this.logTime = new Date();
        this.moneyPrice = moneyPrice;
        this.mallMarkId = mallMarkId;
        this.payType = payType;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getMallId() {
        return mallId;
    }

    public void setMallId(int mallId) {
        this.mallId = mallId;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public long getOldVipExp() {
        return oldVipExp;
    }

    public void setOldVipExp(long oldVipExp) {
        this.oldVipExp = oldVipExp;
    }

    public long getVipExp() {
        return vipExp;
    }

    public void setVipExp(long vipExp) {
        this.vipExp = vipExp;
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public String getActtype() {
        return acttype;
    }

    public void setActtype(String acttype) {
        this.acttype = acttype;
    }

    public int getPhonePlatform() {
        return phonePlatform;
    }

    public void setPhonePlatform(int phonePlatform) {
        this.phonePlatform = phonePlatform;
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        this.reward = reward;
    }

    public Date getLogTime() {
        return logTime;
    }

    public void setLogTime(Date logTime) {
        this.logTime = logTime;
    }

    public String getMoneyPrice() {
        return moneyPrice;
    }

    public void setMoneyPrice(String moneyPrice) {
        this.moneyPrice = moneyPrice;
    }

    public int getMallMarkId() {
        return mallMarkId;
    }

    public void setMallMarkId(int mallMarkId) {
        this.mallMarkId = mallMarkId;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }
}
